<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Markdown.js</title>
    <link rel="stylesheet" type="text/css" href="../libs/showdown/markdown.css"/>
    <link rel="stylesheet" type="text/css" href="../libs/prettify/css/prettify.css"/>
    <script type="text/javascript" src="../libs/showdown/showdown.js"></script>
    <script type="text/javascript" src="../libs/prettify/js/prettify.js"></script>
    <script type="text/javascript" src="../../libs/jquery/jquery-3.1.1.min.js"></script>
</head>
<body>
<div>
    <textarea id="oriContent" style="height:400px;width:600px;" onkeyup="convert()"></textarea>
    <div id="result"></div>
</div>
<script type="text/javascript">
    function convert(){
        var text = document.getElementById("oriContent").value;
        var converter = new showdown.Converter();
        var html = converter.makeHtml(text);
        $("#result").html(html);
        $("pre").addClass("prettyprint").addClass("linenums");
        prettyPrint();
    }
</script>
</body>
</html>